package cn.tedu.fresheveryday.mapper;

import cn.tedu.fresheveryday.pojo.entity.CommentImage;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentImageMapper {
    /**
     * 通过评论id查询评论图片
     * CommentMapper.selectByProductId(int productId)调用了该方法
     * @param commentId
     * @return
     */
    @Select("select id, url from comment_image where comment_id = #{commentId}")
    List<CommentImage> selectByCommentId(String commentId);
}